import request from '@/utils/request'

// 获取路由
export const getRouters = () => {
  // return request({
  //   url: '/getRouters',
  //   method: 'get'
  // })

  return new Promise((res) => {
    const result = {
      "msg": "操作成功",
      "code": 200,
      "data": [
        {
          "name": "Scene",
          "path": "/sceneManage",
          "hidden": false,
          "redirect": "noRedirect",
          "component": "Layout",
          "alwaysShow": true,
          "meta": {
            "title": "场景管理",
            "icon": "system",
            "noCache": false,
            "link": null
          },
          "children": [
            {
              "name": "Scene",
              "path": "scene",
              "hidden": false,
              "component": "sceneManage/scene/scene",
              "meta": {
                "title": "场景列表",
                "icon": "user",
                "noCache": false,
                "link": null
              }
            },
            {
              "name": "Patrol",
              "path": "patrol",
              "hidden": false,
              "component": "sceneManage/patrol/patrol",
              "meta": {
                "title": "巡检列表",
                "icon": "user",
                "noCache": false,
                "link": null
              }
            },
          ]
        },
        {
          "name": "Module",
          "path": "/moduleManage",
          "hidden": false,
          "redirect": "noRedirect",
          "component": "Layout",
          "alwaysShow": true,
          "meta": {
            "title": "模型管理",
            "icon": "system",
            "noCache": false,
            "link": null
          },
          "children": [
            {
              "name": "Module",
              "path": "module",
              "hidden": false,
              "component": "moduleManage/module/module",
              "meta": {
                "title": "模型列表",
                "icon": "user",
                "noCache": false,
                "link": null
              }
            }
          ]
        },
        
        {
          "name": "Http://ruoyi.vip",
          "path": "http://ruoyi.vip",
          "hidden": false,
          "component": "Layout",
          "meta": {
            "title": "若依官网",
            "icon": "guide",
            "noCache": false,
            "link": "http://ruoyi.vip"
          }
        }
      ]
    }

    res(result)
  })
}